home *** CD-ROM | disk | FTP | other *** search
- This diskette contains a set of programs and batch files which I have written
- and am making available to anyone who may find them useful. Most of the
- programs are written in Microsoft's MASM assembler language. For those who
- are interested, I have included the source code. I have either written or
- substantially modified these programs. Some of them were originally derived by
- disassembling .COM files, and others were written by other people and modified
- by me.
-
- The following programs and files are contained on this diskette:
-
- Name Description
-
- @CHANGED.BAT uses a valid WHEREIS file spec, shows how many files
- have the Archive bit set.
- @CLEARA.BAT uses a valid WHEREIS file spec, clears Archive bits for
- matching files.
- @CLEARAQ.BAT same as @CLEARA but requires confirmation for each file.
- @COPY.BAT copies files and supresses generated by normal COPY operation.
- @COPYALL.BAT uses a valid WHEREIS file spec, copies all matching files to
- default drive B: or specified destination.
- @COPYALQ.BAT same as @COPYALL but requires confirmation for each file.
- @COPYARC.BAT uses a valid WHEREIS file spec, copies all matching files with
- Archive bit set to default drive D: or specified destination.
- @COPYARQ.BAT same as @COPYARC but requires confirmation for each file.
- @DELALL.BAT uses a valid WHEREIS file spec, deletes all matching files.
- @DELALQ.BAT same as @delall but requires confirmation for each file.
- @ERA.BAT like normal DEL command but shows names of files to be deleted.
- @FILES.BAT shows specified files with date and time sorted in date and time
- sequence.
- @HOWMANY.BAT uses a valid WHEREIS file spec, shows how many files match.
- @MASM.BAT assembles named file and keeps output .OBJ file.
- @MASML.BAT assembles named file and keeps output .EXE file.
- @MASMLE.BAT assembles named file and keeps output .COM file.
- @MASMLEB.BAT like @MASMLE.BAT but saves .Com file in \BATCH directory.
- @MLU.BAT map lower case mnemonics and operators to upper in MASM source
- files.
- @MUL.BAT map upper case mnemonics operators and comments to lower case in
- MASM source files.
- @MULMLU.BAT like using @MUL and @MLU on the same file.
- @MULT.BAT repeats named command for each occurance of a matching file.
- @POPDIR.BAT return to previously saved directory for specified or default
- drive.
- @PUSHDIR.BAT save current directory for specified or default drive.
- you may also specify a directory to be made current.
- @SET.BAT set variables true in UTIL.ASM include file
- @SHOWALL.BAT uses a valid WHEREIS file spec, displays full path, date, time,
- size in bytes and size in K bytes for all matching files.
- @SHOWALQ.BAT same as @SHOWALL but each match must be confirmed.
- @SWAPDIR.BAT save current directory and return to previously saved directory
- for specified or default drive.
- ATTR.ASM source code for ATTR.COM
- ATTR.COM set or clear file attributes
- ATTR.DOC documentation for ATTR.COM
- BLANK.ASM source code for BLANK.COM
- BLANK.COM quickly erases previously formatted diskettes.
- BLANK.DOC documentation for BLANK.COM
- COLOR.ASM source code for COLOR.COM
- COLOR.COM lets you change foreground, background and border colors easily.
- COMBINE.ASM source code for COMBINE.COM
- COMBINE.COM lets you insert commandline parameters into data while copying
- from standard input to standard output.
- COMBINE.DOC documentation for COMBINE.COM
- DDU.ASM source code for DDU.COM
- DDU.COM "Dangerous" Disk Utility
- DDU.DOC documentation for DDU.COM
- FDUMP.ASM source code for FDUMP.COM
- FDUMP.COM file dump program
- FDUMP.DOC documentation for FDUMP.COM
- FILES.ASM source code for FILES.COM
- FILES.COM simple but versatile file name listing program.
- FILES.DOC documentation for FILES.COM
- FORMAT.ASM source code for FORMAT.COM
- FORMAT.COM pseudo format program to keep you from formatting your hard
- disk accidentally.
- INT.ASM source code for INT.COM
- INT.COM displays addresses for specified interrupts.
- KEYDOS.ASM source code for KEYDOS.COM
- KEYDOS.COM shows DOS key codes for all valid key combinations.
- KEYSCAN.ASM source code for KEYSCAN.COM
- KEYSCAN.COM shows scan codes for all keyboard keys.
- KEYSEND.ASM source code for KEYSEND.COM
- KEYSEND.COM lets you stuff up to 15 keys into DOS's type ahead buffer.
- LAST.ASM source code for LAST.COM
- LAST.COM displays last line or all but last line of standard input
- which may be redirected from an input file. The output may
- also be redirected to a file. (see @POPDIR.BAT, @PUSHDIR.BAT
- and @SWAPDIR.BAT
- LOG.ASM source code for LOG.COM
- LOG.COM tests to see if DOS is copying standard output to the printer
- and lets you change it from within a batch file.
- MACRO.LIB multi purpose macro library (used to assemble FDUMP.ASM)
- MLU.ASM source code for MLU.COM
- MLU.COM map lower case mnemonics and operators to upper case in MASM
- source code while copying from stdin to stdout.
- MUL.ASM source code for MUL.COM
- MUL.COM map upper case mnemonics operators and comments to lower case
- in MASM source code while copying from stdin to stdout..
- OPTMAC.LIB option processing macros for FILES.ASM and WHEREIS.ASM
- RAM.ASM source code for RAM.COM
- RAM.COM shows total memory, memory in use and free, and total extended
- memory.
- SOUND.ASM source code for SOUND.COM
- SOUND.COM program to make various sounds through the speaker.
- SOUND.DOC documentation for SOUND.COM
- SPACE.ASM source code for SPACE.COM
- SPACE.COM shows disk free space in bytes, clusters and K.
- WHEREIS.ASM source code for WHEREIS.COM
- WHEREIS.COM locates files by name, attribute(s) or date anywhere on any
- disk.
- WHEREIS.DOC documentation for WHEREIS.COM
-
- Many of the programs have their own DOC files and need no further explanation
- here. What follows are brief descriptions of the programs which have no
- .DOC files.
-
- Many of the batch files described here use some interesting features of DOS
- which I have just recently become aware of. The most interesting is the
- ability to substitute the values for environment variable references in
- executing batch files.
-
- Two variables are assumed to be set for many of these procedures to work
- properly: DDISK (default disk) and VDISK (virtual disk). These should be set
- at the end of your AUTOEXEC.BAT file.
-
- Examples:
-
- SET DDISK=A:
- SET VDISK=C:
-
- SET DDISK=C:
- SET VDISK=E:
-
- @CHANGED.BAT
-
- This batch file accepts a valid WHEREIS file specification and displays the
- number of matching entries found.
-
- Examples:
-
- @CHANGED
- @CHANGED D:
- @CHANGED /E
- @CHANGED .DOC
-
- @CLEARA.BAT
-
- This batch file accepts a valid WHEREIS file specification and clears the
- archive file flags for all matching files. You will be told how many files
- would be affected and asked for confirmation. If you enter Y or y the
- operation will proceed. If you enter N or n it will stop and no files will be
- affected.
-
- Examples:
-
- @CLEARA
- @CLEARA D:
- @CLEARA /E
- @CLEARA .DOC
-
- @COPY.BAT
-
- This batch file performs the same operation as a standard copy but it supresses
- all output to the screen by redirecting it to the NUL device.
-
- @COPYALL.BAT
-
- This batch file accepts a valid WHEREIS file specification and will by default
- copy all matching files to the B: drive or whatever you specify as a second
- parameter. You will be told how many files were found and asked to enter Y or y
- to do it or N or n to cancel.
-
- Examples:
-
- @COPYALL
- @COPYALL D:
- @COPYALL /E
- @COPYALL .DOC
- @COPYALL *.* E:
- @COPYALL D: E:
- @COPYALL /E E:
- @COPYALL .DOC E:
-
- @COPYALQ.BAT
-
- This batch file is similar to @COPYALL but you are asked before copying each
- file. You must enter Y or y to copy or N or n to skip the named file.
-
- Examples:
-
- @COPYALQ
- @COPYALQ D:
- @COPYALQ /E
- @COPYALQ .DOC
- @COPYALQ *.* E:
- @COPYALQ D: E:
- @COPYALQ /E E:
- @COPYALQ .DOC E:
-
- @COPYARC.BAT
-
- This batch file is similar to @COPYALL but only files with the archive bit are
- considered. The default destination drive is D: instead of B:.
-
- Examples:
-
- @COPYARC
- @COPYARC D:
- @COPYARC /E
- @COPYARC .DOC
- @COPYARC *.* E:
- @COPYARC D: E:
- @COPYARC /E E:
- @COPYARC .DOC E:
-
- @COPYARQ.BAT
-
- This batch file is similar to @COPYALQ but only files with the archive bit are
- considered. The default destination drive is D: instead of B:.
-
- Examples:
-
- @COPYARQ
- @COPYARQ D:
- @COPYARQ /E
- @COPYARQ .DOC
- @COPYARQ *.* E:
- @COPYARQ D: E:
- @COPYARQ /E E:
- @COPYARQ .DOC E:
-
- @DELALL.BAT
-
- This batch file accepts a valid WHEREIS file specification and deletes all
- matching files. You are told how many files will be deleted and asked to
- enter Y or y to do it or N or n to cancel.
-
- Examples:
-
- @DELALL .BAK
-
- @DELALQ.BAT
-
- This batch file is similar to @DELALL but you will be asked to confirm the
- operation before each file will be deleted.
-
- Examples:
-
- @DELALL .BAK
-
- @ERA.BAT
-
- This batch file operates like the standard DEL or ERASE command but the names of
- the files are listed first.
-
- @FILES.BAT
-
- This batch file prints a sorted directory listing using a valid FILES file
- specification. If no second parameter is supplied, /D is used as an option to
- the FILES program so that date and time will be shown and used as the primary
- sort key. If the second parameter is supplied, it is assumed to be a valid
- option for the FILES program and will be used instead of /D. The most typical
- uses for this might be to print sorted directories by date (/D), rounded size
- (/R), or by size (/S).
-
- @HOWMANY.BAT
-
- This batch file accepts a valid WHEREIS file specification and tells you the
- number of matching files on the specified or current default drive.
-
- @MASM.BAT
- @MASML.BAT
- @MASMLE.BAT
- @MASMLEB.BAT
-
- These batch files provide the following basic services:
- 1. Assemble a program using MASM
- 2. Assemble and link a program using MASM and LINK
- 3. Assemble and link a program using MASM LINK and EXE2BIN
- 4. Same as #3 but save results on VDISK drive.
-
- @MLU.BAT
-
- This batch file changes lower case MASM source files to upper case. It
- ignores comments and quoted strings enclosed by both kinds of quotation marks
- (') and (").
-
- @MUL.BAT
-
- This batch file changes upper case MASM source filesto lower case. It ignores
- Quoted strings. Used with @MLU it can ensure that nmemonics and labels are
- in upper case while comments are kept in lower case.
-
- @MULMLU.BAT
-
- This batch file does just what was described above. It uses MUL and MLU to
- do the two operations.
-
- @MULT.BAT
-
- This batch file allows you to perform the same operation on more than one file.
- The first parameter is the procedure to use and the second is the ambiguous
- file name. The procedure is executed once for each matching file.
-
- Example:
-
- @MULT @MULMLU *.ASM
-
- This example will execute the @MULMLU.BAT procedure once for each .ASM file
- found in the current directory.
-
- @POPDIR.BAT
-
- This batch file retrieves the last directory saved by an execution of the
- @PUSHDIR.BAT procedure. It and @PUSHDIR use a file named %1\DIRFILE
- which is an ASCII file containing one line for each execution of @PUSHDIR.
- @POPDIR removes the last line and makes it into a change directory command then
- executes it and tells you to which directory you have been moved.
-
- @PUSHDIR.BAT
-
- This batch file saves the current default default directory for the default
- drive or the one specified as the first parameter. If a second parameter is
- given, it will be used as the directory to change to.
-
- @SET.BAT
-
- This batch file lets you create a file called UTIL.LIB which contains
- statements setting all variables mentioned as parameters to TRUE. This file
- may then be included in a MASM source file to control assembly of conditional
- code.
-
- @SHOWALL.BAT
-
- This batch file uses WHEREIS to find all matching files and FILES to show
- all information about them. Any file spec valid for WHEREIS is acceptable.
-
- Example:
-
- @SHOWALL /E
-
- This would show all information about all files on the default drive which
- have been changed today.
-
- @SWAPDIR.BAT
-
- This batch file is similar to @POPDIR.BAT but the current directory is saved
- immediately before changing to the last previous directory. With this procedure
- you may easily switch between two directories (the current directory and the
- most recently saved directory).
-
- COLOR.ASM
-
- Source code for COLOR.COM
-
- COLOR.COM
-
- This program lets you change foreground background and border colors on your
- screen. Run it with no parameters to see the syntax and choices.
-
- FORMAT.ASM
-
- Source code for FORMAT.COM
-
- FORMAT.COM
-
- This program is run in place of the real FORMAT program. It makes sure that
- you specify a drive and that the specified drive is either A: or B:. The
- real FORMAT.COM program must be renamed to REALFM.COM.
-
- INT.ASM
-
- Source code for INT.COM
-
- INT.COM
-
- This program shows the segment and offset addresses associated with the
- specified interrupt (hex).
-
- KEYDOS.ASM
-
- Source code for KEYDOS.COM
-
- KEYDOS.COM
-
- This program shows the shift keys, scan code and if any, the ascii code for
- any key you press. Press any key combination twice to terminate.
-
- KEYSCAN.ASM
-
- Source code for KEYSCAN.COM
-
- KEYSCAN.COM
-
- This program shows the "raw" key codes (directly from the keyboard). To
- terminate, press the escape key until a message appears and then release it.
-
- KEYSEND.ASM
-
- Source code for KEYSEND.COM
-
- KEYSEND.COM
-
- This program lets you enter quoted strings or hex values for keys to store
- in the system's type ahead buffer.
-
- LAST.ASM
-
- Source code for LAST.COM
-
- LAST.COM
-
- This program reads from standard input and writes to standard output. With
- no parameters, just the last line from the file is written. If a single hyphen
- is entered as a parameter, all but the last line is written. Both
- applications of this program are seen in the @POPDIR.BAT file.
-
- LOG.ASM
-
- Source code for LOG.COM
-
- LOG.COM
-
- This program lets you see if the printer has been activated using ctrl-P from
- a batch file. It also lets you force the printer to be active or inactive by
- specifying ON or OFF. ERRORLEVEL is set nonzero if the printer is active.
-
- MLU.ASM
-
- Source code for MLU.COM
-
- MLU.COM
-
- This program reads from standard input and writes to standard output. It
- works as described under @MLU.BAT.
-
- MUL.ASM
-
- Source code for MUL.COM
-
- MUL.COM
-
- This program reads from standard input and writes to standard output. It works
- as described under @MUL.BAT
-
- RAM.ASM
-
- Source code for RAM.COM
-
- RAM.COM
-
- This program generally describes memory use. it shows total memory, memory in
- use and memory free. It also shows how much (if any) extended memory is
- available.
-
- SPACE.ASM
-
- Source code for SPACE.COM
-
- SPACE.COM
-
- This program describes free space on the specified or default drive in terms of
- bytes K and blocks (allocation units or clusters).
- rogram describes free space on the specified or default drive in terms of
- bytes K and blocks (allocation units or clust